package com.corpgovernment.permission.entity.db;

import com.corpgovernment.common.annotation.OperateLogFieldDesc;
import com.corpgovernment.common.entity.db.BaseEntity;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 角色权限关系
 *
 * @author wangyujue
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "mb_role_permission")
public class MbRolePermission extends BaseEntity {

    /**
     * 角色
     */
    @Column(name = "role_id")
    @OperateLogFieldDesc(value = "角色")
    private Long roleId;

    /**
     * 权限
     */
    @Column(name = "permission_id")
    @OperateLogFieldDesc(value = "权限")
    private Long permissionId;

    @Transient
    private String roleName;

    @Transient
    private String roleDesc;

    @Transient
    private String roleOrgId;

    @Transient
    private String resName;
}
